<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="条码打印" active="activeFlag[0]">
            <div class="pos-a-full shuttle-box left d-b-15" style="right: 50%;top:35px;">
                <div class="row wrapper-y-sm">
                    <div class="operate-bar col-xs-6 font-0">
                        <button class="btn btn-operate m-r-sm" ng-click="batchPreviewOrPrintForSelect('preview')"
                                ng-disabled="!btnPermission.packageCodePrint" translate translate-attr-title="{{!btnPermission.packageCodePrint?'无权限执行此操作':''}}">批量打印预览</button>
                        <button class="btn btn-operate m-r-sm" ng-click="batchPreviewOrPrintForSelect('print')"
                                ng-disabled="!btnPermission.packageCodePrint" translate translate-attr-title="{{!btnPermission.packageCodePrint?'无权限执行此操作':''}}">批量打印</button>
                    </div>
                    <div class="search-bar wrapper-none col-xs-6">
                        <div class="flex clearfix">
                            <input type="text" class="form-control txt-search" translate translate-attr-placeholder="单据号"
                                ng-model="condition.billNo">
                            <span class="input-group-addon cursor-pointer" ng-click="search(1)" style="width:unset;" translate>搜索</span>
                        </div>
                    </div>
                </div>
                <div yb-table-fixed class="table-fixed-wrap has-head ">
                    <div class="th-scroll-x">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="th-check text-center">
                                    <div yb-check-box yb-checked="markInfo.allCheckedMaterial" yb-click="selectAll(dataList, 'Material')"></div>
                                </th>
                                <th ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"  ng-class="{'row-selected': $index === markInfo.curRow}"
                                ng-click="selectRow($index,item)">
                                <td width="40" class="text-center">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, dataList, 'Material')"></div>
                                </td>
                                <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index" width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                    <span ng-if="itemCol.dataField === 'seq'">
                                        {{$parent.$parent.$index+1}}
                                    </span>
                                    <span ng-if="itemCol.dataField !== 'seq'">
                                        {{item[itemCol.dataField]}}
                                    </span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>请输入单据号搜索</div>
                </div>
            </div>
            <div yb-print-conf show-toolbar="toolbarConfig.showPrintConf" ng-model="tempSet"></div>
            <div class="pos-a-full shuttle-box right has-foot" style="left:50%;top:35px">
                <div class="box-head clearfix" style="width: auto;">
                    <span class="font-14"style="float:left" translate>
                         打印参数
                    </span>
                    <div class="col-xs-3 " style="float:left;margin-top: 8px">
                        <select ng-model="printTypeObj.type" class=" form-control" ng-change="printTypeChange()">
                            <option value="0" translate>单据打印</option>
                            <option value="1" translate>直投打印</option>
                        </select>
                    </div>

                    <button class="btn btn-operate fixed-right-50px m-t" ng-click="switchToolbar('PrintConf')" translate>打印配置</button>
                </div>
                <div class="pos-a-full box-body has-head has-foot border-t">
                    <form name="form" class="main-wrap form-horizontal p-t clearfix" novalidate>
                        <div class="form-group col-xs-6" ng-show="printTypeObj.type==1">
                            <label class="col-xs-4 control-label"><i>*</i><span translate>零件号</span>：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="orawyd" class="form-control" ng-model="detailInfo.materialsNo" maxlength="20" ng-blur="materialsNoBlur(detailInfo.materialsNo)">
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label"><span translate>图号</span>：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="orawyd" class="form-control" ng-model="detailInfo.orawyd" maxlength="20">
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label"><span translate>条码描述</span>：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="barcodeDesc" class="form-control" ng-model="detailInfo.barcodeDesc" maxlength="50">
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label"><span translate>规格描述</span>：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="model" class="form-control" ng-model="detailInfo.model" maxlength="30">
                            </div>
                        </div>
                        <div class="form-group col-xs-6" ng-show="printTypeObj.type==1">
                            <label class="col-xs-4 control-label"><span translate>总套数</span>：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="totalSize" class="form-control" ng-model="detailInfo.totalSize" max="10000" maxlength="5" yb-number-input>
                            </div>
                        </div>
                        <div class="form-group col-xs-6">
                            <label class="col-xs-4 control-label"><i>*</i><span translate>总数量</span>：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="totalQty" class="form-control" yb-number-input max="99999.999" maxlength="9" disable-decimal="false" decimal-places="3"
                                       ng-model="detailInfo.totalQty" ng-change="countPack()">
                            </div>
                        </div>
                        <div class="form-group col-xs-6 m-b-xs">
                            <label class="col-xs-4 control-label"><i>*</i><span translate>包装数量</span>：</label>
                            <div class="col-xs-6 wrapper-none">
                                <input type="text" name="packNum" class="form-control" ng-model="detailInfo.packNum" max="999" maxlength="3" yb-number-input ng-change="setPackNum()">
                            </div>
                        </div>
                        <div ng-if="packList.length<1000" class="pos-a-full border-t p-t-sm" ng-style="{'top':printTypeObj.type==1?'210px':'160px'}" style="bottom: 10px;overflow: auto">
                            <div  class="form-group" ng-repeat="item in packList track by $index">
                                <label class="col-xs-2 control-label"><span translate>每包数量</span>：</label>
                                <div class="col-xs-3 wrapper-none">
                                    <input type="text" name="vinid" class="form-control" yb-number-input  disable-decimal="false" decimal-places="3" ng-model="item.currentQty">
                                </div>

                                <label class="col-xs-2 control-label"><span translate>VIN码</span>{{$index+1}}：</label>
                                <div class="col-xs-3 wrapper-none">
                                    <input type="text" name="vinid" class="form-control" ng-model="item.vinid" maxlength="25">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="bottom-area btn-bar text-center border-t clearfix">
                    <button  class="btn btn-primary m-r-sm"  ng-show="printTypeObj.type==1"
                             yb-download download-url="exportParam.outPutUrl" download-param="exportParam.outPutParam" check-callback="outPut()"
                            ng-disabled="!btnPermission.packageCodePrint" translate translate-attr-title="{{!btnPermission.packageCodePrint?'无权限执行此操作':''}}">导出</button>
                    <button type="button" ng-disabled="detailInfo.packNum>1000" class="btn btn-default m-r-sm" ng-click="previewOrPrintTicket('preview')" translate>打印预览</button>
                    <button type="button" class="btn btn-primary" ng-click="previewOrPrintTicket('print')"
                            ng-disabled="detailInfo.packNum>1000 || !btnPermission.packageCodePrint" translate translate-attr-title="{{!btnPermission.packageCodePrint?'无权限执行此操作':''}}">打印</button>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="printXgcy" ng-include="'view/printTemplate/cyTicketTpl.html'" ng-show="false"></div>